home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act4 / 00653.ls < prev    next >
Encoding:
Text File  |  1995-04-05  |  1.9 KB  |  64 lines

  1. on exitFrame
  2.   global BugColors, BugColorKey, lastclickon, pal, colpal, bucketcol, level1, masterlist, kingcolor, waittime
  3.   set colornum to getAt(BugColorKey, lastclickon - 13)
  4.   set palnum to getAt(pal, colornum)
  5.   set correctcolor to getAt(colpal, palnum)
  6.   set rightcan to getPos(bucketcol, palnum)
  7.   set rightcolor to getAt(bucketcol, rightcan)
  8.   set gjidebug to 0
  9.   if level1 = 1 then
  10.     set offset to 0
  11.     set hinter to 1
  12.   else
  13.     set offset to 10
  14.     set hinter to 2
  15.   end if
  16.   set mycolor to the foreColor of sprite lastclickon
  17.   startTimer()
  18.   set cansprite to rightcan + 37
  19.   set animlist to getAt(masterlist, offset + rightcolor)
  20.   repeat with xxx = 1 to 3
  21.     set the foreColor of sprite lastclickon to 0
  22.     updateStage()
  23.     set the foreColor of sprite lastclickon to mycolor
  24.     updateStage()
  25.     if the timer > 100 then
  26.       exit repeat
  27.     end if
  28.   end repeat
  29.   set the foreColor of sprite lastclickon to 0
  30.   set mycast to the castNum of sprite cansprite
  31.   set myx to the locH of sprite cansprite
  32.   set myy to the locV of sprite cansprite
  33.   puppetSprite(cansprite, 1)
  34.   set limit to count(animlist)
  35.   startTimer()
  36.   set timelimit to the timer + 90
  37.   if level1 = 1 then
  38.     repeat with xxxx = 38 to 41
  39.       if not (cansprite = xxxx) then
  40.         puppetSprite(xxxx + 4, 1)
  41.         next repeat
  42.       end if
  43.       puppetSprite(xxxx + 4, 0)
  44.       set the visible of sprite (xxxx + 4) to 1
  45.     end repeat
  46.     play frame "L" & hinter & ".Hint3." & rightcolor
  47.     repeat with xxxx = 42 to 45
  48.       puppetSprite(xxxx, 0)
  49.     end repeat
  50.   else
  51.     play frame "L" & hinter & ".Hint3." & rightcolor
  52.   end if
  53.   if not gjidebug then
  54.     setcolor(lastclickon, 0)
  55.   end if
  56.   set the castNum of sprite cansprite to mycast
  57.   set the locH of sprite cansprite to myx
  58.   set the locV of sprite cansprite to myy
  59.   updateStage()
  60.   set the foreColor of sprite lastclickon to correctcolor
  61.   setAt(BugColors, lastclickon - 13, 1)
  62.   play done
  63. end
  64.